<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .title {
            display: flex;
            background-color: #222;
        }
        .item {
            display: block;
            flex: 1;
            background-color: #56a5f1;
            color: white;
            border-radius: 4px;
            margin: 5px;
            text-align: center;
        }
        /* 通过媒体查询获取宽度 并隐藏相应内容 */
        @media (min-width:1200px) {
            .item:nth-of-type(4),
            .item:nth-of-type(5) {
                display: block;
            }
        }
        @media (min-width:768px) and (max-width:1199px) {
            .item:nth-of-type(5) {
                display: none;
            }
        }
        @media (min-width:480px) and (max-width:767px) {
            .item {
                text-align: left;
            }
            .item:nth-of-type(5) {
                display: none;
            }
        }
        @media (max-width:479px) {
            .item {
                text-align: left;
            }
            .item:nth-of-type(4),
            .item:nth-of-type(5) {
                display: none;
            }
        }
    </style>
</head>
<body>
    <div class="title">
        <div class="item">青春动漫</div>
        <div class="item">青春动漫</div>
        <div class="item">青春美漫</div>
        <div class="item">青春日漫</div>
        <div class="item">青春国漫</div>
    </div>
</body>
</html>